package exemplos;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class Sala extends JFrame{  
	  
    private Container container;  
    private JPanel janela;  
      
    public Sala(){  
        super("Simulação Aleatória - Cinema");  
        geraJPanel();   
        this.container = getContentPane();  
        this.container.setLayout(null);  
        this.container.add(this.janela);  
        setSize(600,400);  
        setLocation(100,125);  
        setVisible(true);  
          
        setDefaultCloseOperation(EXIT_ON_CLOSE);  
    }  
              
    public static void main(String[] args){  
        Sala sala = new Sala();  
          
    }  
      
    public void geraJPanel(){  
        this.janela = new JPanel();  
        this.janela.setSize(500, 300);  
        this.janela.setBackground(Color.lightGray);  
        this.janela.setLayout(new BorderLayout());  
        this.janela.add(new Pessoa());  
        this.janela.setBorder(BorderFactory.createLineBorder(Color.black, 1));  
    }  
  
          
    public Container getContainer() {  
        return container;  
    }  
  
    public void setContainer(Container container) {  
        this.container = container;  
    }  
  
    public JPanel getJanela() {  
        return janela;  
    }  
  
    public void setJanela(JPanel janela) {  
        this.janela = janela;  
    }  
      
      
}
